﻿
<table>
    <tr>
      
        <td>所属公司</td>
        <td>
            <div id="autcompany_name" name="company_name" onvaluechanged="oncompanyChanged" class="mini-autocomplete" style="width:100px;" popupwidth="200" textfield="dept_name" valuefield="dept_name" valuefromselect="true" oncloseclick="    onCloseClick" pinyinfield="dept_name"
                 showclose="true" url="../../Share/GetJsonList?tablename=v_fin_ReceivablesAuditing&fieldnames=dept_name&searchField=dept_name&where=1=1 group by dept_name">
                <div property="columns">
                    <div header="公司名称" field="dept_name"></div>
                </div>
            </div>

        </td>
        
        
        
        
          <!--<td>
                生成日期
            </td>
            <td>
                <input id="birth_start_date" name="birth_start_date" class="mini-datepicker" style="width:100px;" />
            </td>
            <td>
                <input id="birth_end_date" name="birth_end_date" class="mini-datepicker" style="width:100px;" />
            </td>-->
        <td>结算单号</td>
        <td>
            <!--<input id="bill_no" name="bill_no" class="mini-textbox" style="width:100px;" />-->
            <div id="autbill_no" name="bill_no" class="mini-autocomplete" style="width:130px;" popupwidth="200" textfield="bill_no" valuefield="bill_no" valuefromselect="true" oncloseclick="onCloseClick" pinyinfield="bill_no"
                 showclose="true" url="../../Share/GetJsonList?tablename=t_arps&fieldnames=bill_no&searchField=bill_no">
                <div property="columns">
                    <div header="简称" field="bill_no"></div>
                </div>
            </div>
        </td>
        <td>
            收款日期
        </td>
        <td>
            <input id="receive_start_date" name="receive_start_date" class="mini-datepicker" style="width:100px;" />
        </td>
        <td>
            <input id="receive_end_date" name="receive_end_date" class="mini-datepicker" style="width:100px;" />
        </td>
        <td>
            审核日期
        </td>
        <td>
            <input id="status_start_date" name="status_start_date" class="mini-datepicker" style="width:100px;" />
        </td>
        <td>
            <input id="status_end_date" name="status_end_date" class="mini-datepicker" style="width:100px;" />
        </td>
        <td>
            <a class="mini-button"  onclick="fnCustomQuciklyQuery()">简单查询</a>
        </td>
      
        <!-- <td>客户</td>
        <td>
            <div id="autcustomer_name" name="customer_name" class="mini-autocomplete" style="width:120px;float: left;" popupwidth="400" allowinput="true" textfield="short" valuefield="id"
                 valuefromselect="true"
                 url="../../Share/GetJsonList?tablename=t_base_objs&fieldnames=id,zucode,short&where=zclass_id=100&searchField=short,zucode">
                <div property="columns">
                    <div header="id" field="id" width="0"></div>
                    <div header="编号" field="zucode"></div>
                    <div header="简称" field="short"></div>
                </div>
            </div>
        </td>
        <td>状态</td>
        <td>
            <input id="status_type" name="status_type" shownullitem="true" class="mini-combobox" style="width: 100px;"
                   data="[{id:0,text:'未审核'},{id:1,text:'已审核'}]" textfield="text" valuefield="id" />
        </td>
        <td>收款方式</td>
        <td>
            <input id="arp_type_id" name="arp_type_id" shownullitem="true" class="mini-combobox" style="width: 80px;"
                   url="/extendpage/data/jsondata.aspx?entity=v_data_base_dictionary_detail&condition=code='fin_arp_type'"
                   idfield="id" textfield="name" valuefield="value" />
        </td>-->
    </tr>
</table>

<script>
    function oncompanyChanged(e) {
        var company_name = mini.get("autcompany_name").getValue();
        var autbill_no = mini.get("autbill_no");
        //autbill_no.setValue("");
        if (company_name == "") {
            var url = "../../../Share/GetJsonList?tablename=t_arps&fieldnames=bill_no&searchField=bill_no";
            autbill_no.setUrl(url);
        }
        else {
            var url = "../../Share/GetJsonList?tablename=v_fin_ReceivablesAuditing&fieldnames=bill_no&searchField=bill_no&where=dept_name=" + "'" + company_name + "'";//group by bill_no";
            autbill_no.setUrl(url);
        }
    }
</script>